#ifndef mW_mapeditor_include
#define mW_mapeditor_include



#include <allegro.h>
#include <stdlib.h>
#include "keyboard.h"
#include "tile.h"
#include "utility.h"
#include "game.h"
#include "map.h"
#include "interface.h"

#define DEBUG 1

#define mW_mapeditor_tiles_top_pixel  10
#define mW_mapeditor_tiles_left_pixel 520

#define mW_mapeditor_tiles_per_row 4
#define mW_mapeditor_tiles_rows 12

#define mW_MAPEDITOR_EDITING_TILES 0
#define mW_MAPEDITOR_EDITING_PASSABLE 1
#define mW_MAPEDITOR_EDITING_NONPASSABLE 2

mW_map * mW_mapeditor_map;

char mW_mapeditor_editing;


unsigned short mW_mapeditor_top_tile;
unsigned short mW_mapeditor_selected_tile_id;

BITMAP * mW_mapeditor_img_over_tile;
BITMAP * mW_mapeditor_selected_tile;


void mW_mapeditor_draw ();
int mW_mapeditor_draw_interface (BITMAP * surface);
int mW_mapeditor_draw_tiles (BITMAP * surface);
int mW_mapeditor_handle_mouse ();
int mW_mapeditor_loop ();
int mW_mapeditor_text_interface ();

#endif // mW_mapeditor_include
